package main

import "fmt"

func main() {
	ch := make(chan int, 1)
	ch <- 2
	n, ok := <-ch
	if ok {
		fmt.Println(n)
	}
	close(ch)
}
